Fix feedback dialog focus ring clipping - #394
Conversation
🎨 Storybook previewUpdated for cf4e1fc ❌ Failed snapshots (2)These stories' HTML snapshots changed. Update snapshots ↗ to regenerate baselines and open a PR: Settings/AutoConfigField › ControlsSettings/AutoTuningSection › Evolution Settings |
📋 PR Overview
🔬 Coverage
|
Juanpe Bolívar (arximboldi)
left a comment
There was a problem hiding this comment.
I tested it and it works, yay!
However:
- Storybooks seem broken
- A couple of small improvements could be done in the code
| const FEEDBACK_DIALOG_BODY_CLASS = "space-y-6 flex-1 overflow-y-auto pl-1 py-1 pr-3"; | ||
| const FEEDBACK_SHARE_OPTIONS_CLASS = | ||
| "space-y-2 max-h-[28vh] overflow-y-auto pl-1 py-1 pr-2"; |
There was a problem hiding this comment.
Extracting these vars out seems unnecessary, it doesn't hurt though.
| describe("FeedbackDialog focus ring buffers", () => { | ||
| it("keeps focus-ring paint inside scrollable dialog containers", async () => { | ||
| useWidgetStore.getState().openFeedback(FeedbackType.Issue); | ||
|
|
||
| render(<FeedbackDialog />); | ||
|
|
||
| const textarea = await screen.findByLabelText("DESCRIBE WHAT HAPPENED"); | ||
| const dialogBody = textarea.closest(".overflow-y-auto"); | ||
|
|
||
| expect(dialogBody).toHaveClass("pl-1", "py-1", "pr-3"); | ||
|
|
||
| const shareCheckbox = screen.getByRole("checkbox", { name: "Current app state" }); | ||
| const shareOptions = shareCheckbox.closest(".overflow-y-auto"); | ||
|
|
||
| expect(shareOptions).toHaveClass("pl-1", "py-1", "pr-2"); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
This test just repeats the implementation. I would remove it.
|
/dm address comments |
Address review feedback from arximboldi: - Inline FEEDBACK_DIALOG_BODY_CLASS and FEEDBACK_SHARE_OPTIONS_CLASS directly at their JSX use sites; the constants added no reuse value - Remove feedback-dialog.test.tsx which only asserted the presence of the class strings themselves, mirroring the implementation without testing meaningful behaviour
|
Addressed Juanpe Bolívar (@arximboldi)'s review (commit 7538045):
Changed files: The Storybook snapshot failures ( |



Summary
Original problem screenshot: attached in the first PR comment.
Test Plan
git fetch origin develop && git rev-list --left-right --count HEAD...origin/develop->1 0after commit, meaning this branch is one commit ahead of latestorigin/developand not behind.bun run test:unit src/components/widget/feedback/feedback-dialog.test.tsxbun run check-> 0 errors, existing 131 warningsbun -F native buildCurrent app state, and verified focus rings have left/top breathing room.$claude-review: one outerclaude-fable-5/xhighreview call; valid findings addressed before PR creation.Manual QA instructions:
Report Issue.Current app stateis focused underShare with the team.Docs